home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Internet Software / Utilities / TextToHTML 1.2.3 / Readme next >
Encoding:
Text File  |  1995-05-12  |  12.4 KB  |  208 lines  |  [TEXT/ttxt]

  1. TextToHTML 1.2.3ß
  2.  
  3. by Kris Coppieters - © Logic n.v.
  4. Derbystraat 25
  5. B-9051 Sint-Denijs-Westrem
  6. Belgium - Europe
  7. Internet address: kris@logic.be
  8.  
  9. March 11,1995
  10. Check out the CompuServe MACCOMM forum, LIB 14 or http://www.logic.be for more recent versions.
  11.  
  12. This software is freeware. Please do not distribute it without this Readme file. You may customize this software for your own purposes, but please don't redistribute customized versions: only unmodified versions can be distributed.
  13. This software is distributed 'as is': no warranties are made, either expressed or implied.
  14.  
  15. Thanks to Paul Van Cotthem of Apple Computer Belgium: many of the features of this program were suggested by him.
  16. Internet address: vancotthem.p@applelink.apple.com
  17.  
  18. If you are updating an older version: the update history is appended at the end of this document.
  19.  
  20. WHAT DOES IT DO?
  21.  
  22. TextToHTML quickly converts text or RTF files dropped onto its icon into HTML format. When converting multiple text, RTF or HTML files at once, it also creates an HTML index file with links to those files, complete with graphical bullets if necessary. It can also automatically link images. With TextToHTML you can set up a basic WWW structure in 15 minutes, starting from scratch.
  23.  
  24. (RTF = Rich Text Format, used by several word processors; HTML = Hyper Text Markup Language, used for formatting documents on the World Wide Web).
  25.  
  26. • The first 'real' text line it finds in an original text or RTF file is interpreted to be the window title and it is also tagged as an <H1> header. The rest of the file is considered to be body text.
  27.  
  28. • For reference purposes, the filename of the original file is added at the end of the resulting HTML file.
  29.  
  30. • Single carriage returns or line feeds are converted to the <BR> tag, multiple sequential carriage returns are collapsed into a <P> tag.
  31.  
  32. • Special and reserved characters are converted according to the list of ISO Latin-1 character entities. Mac characters without ISO Latin-1 counterpart are converted to character sequences with some visual similarity.
  33. (For more information on this, check out this URL: http://www.utirc.utoronto.ca/HTMLdocs/NewHTML/entities.html).
  34.  
  35. • The creator of the converted HTML files is set to MOSS (Netscape). You can change this (see below). 
  36.  
  37. • If there are GIF or JPEG files present for use as a logo, bullets, or illustrations, they can be linked in automatically.
  38.  
  39. HOW TO USE IT?
  40.  
  41. There are three ways to use it:
  42.  
  43. 1) If you drop a single file onto the TextToHTML application icon, it gets converted into HTML format and it is saved in the same folder as the original file. The name of the resulting HTML file will be a derivative of the original file's name,  with ".html" appended.
  44.  
  45. Tip: if you have no permission to write in this folder, TextToHTML will just beep, and do nothing. This can occur on CD-ROMS and on file servers. First copy the file to a location where you do have write access.
  46.  
  47. Tip: if you want to run the conversion again on the same file, you don't have to trash the previous .html file first, because it will be overwritten.
  48.  
  49. Tip: you can use the resulting .html file as a base to start with, and add graphics and extra links manually with an HTML editor.
  50.  
  51. Tip: if your Macintosh desktop is corrupt, TextToHTML will not let you drop anything. In that case, rebuild your desktop first (hold Command-Option during startup).
  52.  
  53. 2) If you drop multiple files onto the TextToHTML application icon, they all get converted into HTML format, and an additional index file with hot links to the other files is created. The converted files are stored in the same folder as the  index file. Except for the index file, the names of the HTML files are of the form "X####_<name>.html", where #### is a sequential number, and <name> is a derivative of the original file name. Start browsing from the index file.  Each "X" file contains a backlink to the main index file.
  54.  
  55. Tip: If you hold the option key while dropping multiple files onto TextToHTML, the files are processed one by one without creating an index file.
  56.  
  57. 3) If you drop a folder onto the TextToHTML application, it converts all the files in that folder and its sub-folders. It creates a main index file, which is the root of a tree-structure that mimics the structure of the folders. The HTML files are all stored in the same folder as the main index file.  Each "X" file contains backlinks to the main index file and to the file one level up in the tree structure.
  58.  
  59. Tip: if TextToHTML finds .html files in the original folder structure, they are just copied without changes, and linked into the menu structure. Their content is not changed or updated in any way - so check their links afterwards!
  60.  
  61. Tip:  you can use this last feature to insert 'gateway'-documents to distant pages in your menu structure.
  62.  
  63. Tip: don't be alarmed if a certain sub-folder does not appear in the index tree: if there are no convertible documents in a folder or one of it's subfolders, it is not added to the index tree.
  64.  
  65. ADDING GRAPHICS
  66.  
  67. If you have illustrations that you want to include, you should first put them in the destination folder, before using TextToHTML. For every original TEXT or RTF file called <file>, there will be an auto-inclusion of one or more of the files called:
  68.  
  69. <file>.jpg
  70. <file>.gif
  71. <file>_t.jpg
  72. <file>_t.gif
  73. <file>_m.jpg
  74. <file>_m.gif
  75. <file>_b.jpg
  76. <file>_b.gif
  77.  
  78. For example: if you have a file called Kris somewhere in the source folder, and you provide a file Kris.gif in the destination folder before the conversion, the image Kris.gif will be auto-inserted just after the title in the HTML file that results from converting the file Kris.
  79.  
  80. <file>.gif and/or <file>.jpg is included just after the title in the converted file.
  81.  
  82. <file>_t.gif and/or <file>_t.jpg (t stands for 'top') is included before the converted file, just after the optional logo.
  83.  
  84. <file>_m.gif and/or <file>_m.jpg (m stands for 'middle') is included after the title in the converted file, and eventually after <file>.gif and <file>.jpg if one of these is present.
  85.  
  86. <file>_b.gif and/or <file>_b.jpg (b stands for bottom) is included after the body of the converted file. 
  87.  
  88. Try the included example - it will make things easier to understand!
  89.  
  90. ADDING LOGO AND BULLETS
  91.  
  92. If you want to insert your logo or some graphical bullets in all HTML files, you should provide one or more of the following four files in the destination folder before the conversion:
  93.  
  94. logo.gif or logo.jpg is inserted at the top at every converted file. Put your company logo in this file.
  95.  
  96. bullet.gif or bullet.jpg is prefixed to every link to a converted document.
  97.  
  98. submenu.gif or submenu.jpg is prefixed to every link to a submenu (corresponds to a subfolder).
  99.  
  100. index.gif or index.jpg is prefixed to every link back to the previous index file.
  101.  
  102. topindex.gif or topindex.jpg is prefixed to every link back to the top index file.
  103.  
  104. Check the included example. In the example, topindex.gif and index.gif look equal because of lack of inspiration on my side...
  105.  
  106. YOU SHOULD KNOW THAT...
  107.  
  108. TextToHTML has very little error handling: it just beeps and quits. Possible causes: application size to small, no write access, or just plain bugs. Let me know if you encounter them!
  109.  
  110. TextToHTML currently ignores character formatting in text files. For example if you would convert this Readme file (which was created with SimpleText), the bold, italic and underline styles are not converted into HTML tags.
  111.  
  112. TextToHTML also reads and converts Mac RTF files, but this is still pretty beta: if you encounter problems with a particular RTF file, I would be happy if you sent it to me over e-mail, so I can further debug TextToHTML.
  113.  
  114. You should be careful not to use names like the ones TextToHTML uses for your own HTML files, to avoid name conflicts.
  115.  
  116. HOW TO CUSTOMIZE IT ?
  117.  
  118. If you have ResEdit handy, you can do some customisations. 
  119.  
  120. There are two STR# resources you can change: 20000 and 20001. 
  121.  
  122. • 20000 contains  parameters (creator, texts used,...); just open it: I added remarks to make it somewhat self-explanatory.
  123.  
  124. Tip: if you want to change the creator from Netscape (MOSS) to another application, change string 2.
  125.  
  126. Tip: if you want the resulting index files sorted by file name, rather than by document title, change string 42 to a 1. Attention: when (and only when) you do this, TextToHTML will strip leading spaces and digits from folder names before using them in an index file. This allows you to customise the order of your documents and subfolders in the Finder by prefixing them with one or more spaces and digits 0-9. Use the 'View by Name' setting to look into the main folder. The leading digits and spaces will not show up in the HTML menus.
  127.  
  128. • 20001 contains the translation table: there are 255 strings, one for every ASCII character except NUL. If a string is empty, the character is not translated. 
  129.  
  130. Tip: You can insert some extra HTML code in the converted files in different locations: before the header, after the header, at the end of the file, before a hotlink, after a hotlink,....
  131.  
  132. I used this feature to add:
  133.  
  134. «10»«17»
  135. <EM>This file was converted with TextToHTML - (c) Logic n.v.</EM>
  136.  
  137. at the end of every file: if you want to eliminate this, just change or empty STR# 20000 - string 24. Please do not redistribute versions with this string changed! The text «10» is a macro that is replaced by a reference to the image <file>_b.gif and/or <file>_b.jpg if these are present in the destination folder. «17» is a macro that is replaced by a text that mentions the name of the original file if applicable.
  138.  
  139. MACROS
  140.  
  141. I do not intend to document these extensively - I implemented them mostly to make life a little easier for myself when customising TextToHTML, and not everything is tested: so no warranties! In short, everything between « and » (ASCII 199 and 200), is interpreted as a macro. Macros are evaluated recursively. 
  142.  
  143. • If this macro string is numeric, it is replaced by the string with the same number from STR# 21000. If this string contains macros, they are also evaluated.
  144.  
  145. • There are also some symbolic macros:
  146.  
  147. «IFN» is the name of the original file
  148. «OFN» is the name of the HTML file
  149. «IDX» is the name of the index file one level up
  150. «TIDX» is the name of the top level index file
  151. «PCOUNT» is the number of <P> strings generated up to this point.
  152. «BRCOUNT» is the number of <P> strings generated up to this point.
  153.  
  154. • Conditional macros:
  155.  
  156. «?string1:=string2» is a conditional macro that only inserts string2 if string1 is an existing file in the destination folder.
  157.  
  158. «!string1:=string2» is a conditional macro that only inserts string2 if string1 is not empty
  159.  
  160. • You can also replace the ':=' by '::'. If you do so, string2 will be put through an extra translation to HTML.
  161.  
  162. Normally, you cannot insert macros in text documents, because ASCII 199 and ASCII 200 are translated to different characters before macro's are evaluated. If you would like to use macro's in your text documents, you have to empty STR# 20001, string 199 and 200.
  163.  
  164. UPDATE HISTORY
  165.  
  166. NEW in 1.2.3
  167.  
  168. • Strip leading digits and spaces from directory names when ordering by file name.
  169.  
  170. • Changed default file name to 'index.html' (with lower case i).
  171.  
  172. NEW in 1.2.2
  173.  
  174. • Macro-strings implemented (not documented) to make conditional inserts in generated HTML code: depending on the presence or absence of files in the destination folder, extra HTML code is generated.
  175.  
  176. • Restructured STR# 20000 and 20001 using macro strings. 
  177.  
  178. • Auto-insert of bullets, logo, images,... if they are present and named according to a simple naming convention.
  179.  
  180. • Changeable sorting criterium for generated menu options
  181.  
  182. NEW in 1.2.1
  183.  
  184. • If STR# 20000 - string 8 is emptied, the filename of the original file is NOT appended to the converted document.
  185.  
  186. NEW in 1.2.0
  187.  
  188. • Resolved bug in RTF file reader: soft hypens are now interpreted OK.
  189. • Added option-drag feature for multiple files: when holding down option key when dragging multiple documents onto TextToHTML, the files are converted without creating index files.
  190.  
  191. NEW in 1.1.10
  192.  
  193. • Added customisable prefixes and suffixes for:
  194.   - normal menu hot links (default <B> and </B>)
  195.   - hot links to sub menus (default empty)
  196.   - hot links to previous level (default empty)
  197.   - hotlinks to upper level (default empty)
  198.  
  199. NEW in 1.1.9
  200.  
  201. • Added translation for the following characters which are supported by Netscape:
  202.    ® -> Registered Trademark -> ®
  203.    © -> Copyright -> ©
  204. • Removed the <code></code> tags when converting special characters.
  205. • The names of subfolders nested within a dropped folder will now appear in bold in the index file.
  206. • Fixed some RTF conversion bugs.
  207.  
  208.